/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.click.app.webapp.action;

import com.click.app.model.BalanceEmployee;
import com.click.app.model.CutDetail;
import com.click.app.model.PantDetail;
import com.click.app.model.PantDetailCutDetail;
import com.click.app.model.PantDetailTradeMark;
import com.click.app.model.PeriodPaymentEmployee;
import com.click.app.model.ProcessDressmaker;
import com.click.app.model.SeamStorage;
import com.click.app.model.StorageCut;
import com.click.app.model.TradeMark;
import com.click.app.service.BalanceEmployeeManager;
import com.click.app.service.CutDetailManager;
import com.click.app.service.GenericManager;
import com.click.app.service.PantDetailCutDetailManager;
import com.click.app.service.PantDetailManager;
import com.click.app.service.PantDetailTradeMarkManager;
import com.click.app.service.PeriodPaymentEmployeeManager;
import com.click.app.service.ProcessDressmakerManager;
import com.click.app.service.SeamStorageManager;
import com.click.app.service.StorageCutManager;
import java.util.Iterator;
import java.util.List;

/**
 *
 * @author ronald
 */
public class PantDetailAction extends BaseAction {

    private PantDetailManager pantDetailManager;
    private CutDetailManager cutDetailManager;
    private StorageCutManager storageCutManager;
    private PantDetailCutDetailManager pantDetailCutDetailManager;
    private List<CutDetail> cutDetailList;
    private List<PantDetail> pantDetailList;
    private List<StorageCut> storageCutList;
    private Long stockChoice;
    private PantDetail pantDetail;
    private PantDetailCutDetail pantDetailCutDetail;
    private StorageCut storageCut;
    private Long id;
    private Long idTemp;
    private SeamStorageManager seamStorageManager;

    private List<TradeMark> tradeMarkList;
    private GenericManager<TradeMark, Long> tradeMarkManager;
    private String optTradeMark;
    private ProcessDressmakerManager processDressmakerManager;
    private ProcessDressmaker processDressmaker;
    private Integer quantity;
    private PantDetailTradeMarkManager pantDetailTradeMarkManager;
    private List<PantDetailTradeMark> pantDetailTradeMarkList;
    private Integer currentCuantity;
    private BalanceEmployeeManager balanceEmployeeManager;
    private PeriodPaymentEmployeeManager periodPaymentEmployeeManager;
    private PeriodPaymentEmployee periodPaymentEmployee;

    public String edit(){

       return SUCCESS;
    }

    public String addPantToProcessDressMaker(){
        processDressmaker = processDressmakerManager.get((Long)getSession().getAttribute("pDressMId"));
        pantDetailList = processDressmaker.getPantDetails();
        storageCutList = storageCutManager.getAllGreaterThanCero();
        saveMessage(getText("processDressMakerAction.saveProcessDressMaker"));

        return SUCCESS;
    }

    public String save(){
        System.out.println("PantDetailAction -> save() ... begin");
        if(storageCut.getId() != -1 && !optTradeMark.equals("-1")){
            storageCut = storageCutManager.get(storageCut.getId());
            pantDetail.setPriceXclothes(0.0D);
            if(pantDetail.getQuantity() <= storageCut.getStock() ){
                if(pantDetail.getId() == null){

                    List<SeamStorage> seamStorageList = seamStorageManager.findByPantDesignAndTradeMark(
                                                          storageCut.getPantDesign().getId(), new Long(optTradeMark));
                    TradeMark tradeMark = tradeMarkManager.get(new Long(optTradeMark));

                    SeamStorage seamStorage;
                    ProcessDressmaker processDressmaker = processDressmakerManager.get((Long)getSession().getAttribute("pDressMId"));

                    pantDetail.setStorageCut(storageCut);
                    pantDetail.setProcessDressmaker(processDressmaker);
                    pantDetail.setPriceXclothes(0.0D);
                    pantDetail.setTotalAmountClothes(0.0D);

                    pantDetail.setQuantityFail(0);
                    pantDetail.setPriceXclotheFail(0.0D);
                    pantDetail.setTotalAmountFailClothes(0.0D);

                    pantDetail.setQuantityRealClothesCurrent(pantDetail.getQuantity() - pantDetail.getQuantityFail());
                    pantDetail.setQuantityRealClothes(pantDetail.getQuantity() - pantDetail.getQuantityFail());

                    pantDetail.setTotalAmount(pantDetail.getPriceXclothes() * pantDetail.getQuantity());
                    pantDetail.setCurrentAmount(pantDetail.getPriceXclothes() * pantDetail.getQuantity());
                    pantDetail.setDeleted(true);

                    storageCut.setStock(storageCut.getStock() - pantDetail.getQuantity());
                    pantDetail = pantDetailManager.save(pantDetail);

                    PantDetailTradeMark pantDetailTradeMark = new PantDetailTradeMark();
                    pantDetailTradeMark.setQuantity(pantDetail.getQuantity());
                    pantDetailTradeMark.setPantDetail(pantDetail);
                    pantDetailTradeMark.setTradeMark(tradeMark);

                    pantDetailTradeMark = pantDetailTradeMarkManager.save(pantDetailTradeMark);

                    pantDetail.setDistribution("["+pantDetailTradeMark.getTradeMark().getName()+" - "
                                                  +pantDetailTradeMark.getQuantity()+"]");
                    pantDetail = pantDetailManager.save(pantDetail);

                    cutDetailList = cutDetailManager.findByPantDesignAndLastDateAndNoCero(
                                                                            storageCut.getPantDesign().getId());
                    Integer quantity = pantDetail.getQuantity();

                    for (Iterator<CutDetail> it = cutDetailList.iterator(); it.hasNext();) {
                        CutDetail cd = it.next();
                        PantDetailCutDetail pantDetailCutDetail = new PantDetailCutDetail();
                        if(quantity >= cd.getQuantityRealClothesCurrent()){
                            pantDetailCutDetail.setQuantity(cd.getQuantityRealClothesCurrent());
                            pantDetailCutDetail.setCutDetail(cd);
                            pantDetailCutDetail.setPantDetail(pantDetail);
                            quantity = quantity - cd.getQuantityRealClothesCurrent();
                            cd.setQuantityRealClothesCurrent(0);
                            pantDetailCutDetailManager.save(pantDetailCutDetail);
                            cutDetailManager.save(cd);
                        }else{
                            pantDetailCutDetail.setQuantity(cd.getQuantityRealClothesCurrent());
                            pantDetailCutDetail.setCutDetail(cd);
                            pantDetailCutDetail.setPantDetail(pantDetail);
                            cd.setQuantityRealClothesCurrent(cd.getQuantityRealClothesCurrent() - quantity);
                            quantity = 0;
                            pantDetailCutDetailManager.save(pantDetailCutDetail);
                            cutDetailManager.save(cd);
                            break;
                        }
                    }

                    List<SeamStorage> sStList =
                            seamStorageManager.findByPantDesignAndTradeMark( pantDetail.getStorageCut().getPantDesign().getId()
                                                                           , tradeMark.getId());
                    SeamStorage seamStAux;
                    Integer stock = 0;
                    if(!sStList.isEmpty()){
                        seamStAux = sStList.get(0);
                        stock = seamStAux.getStock();
                    //    seamStAux.setStock(stock + pantDetail.getQuantity());
                    }else{
                        seamStAux = new SeamStorage();
                        seamStAux.setPantDesign(pantDetail.getStorageCut().getPantDesign());
                      //  seamStAux.setStock(pantDetail.getQuantity());
                        seamStAux.setTradeMark(tradeMark);
                    }
                    seamStorageManager.save(seamStAux);

                    saveMessage(getText("pantDetail.savePantDetail"));
                    System.out.println("PantDetailAction -> save() ... end");
                    return SUCCESS;
                }
            }else{
                tradeMarkList = tradeMarkManager.getAll();
                errorMessage(getText("pantDetail.errorDatasPantDetail"));
                System.out.println("PantDetailAction -> save() ... end");
                return ERROR;
            }
        }
        System.out.println("PantDetailAction -> save() ... end");
        saveMessage(getText("pantDetail.error-1"));
        return ERROR;
    }
    public String cancel(){
        System.out.println("PantDetailAction -> cancel()");
        System.out.println("PantDetailAction -> end cancel()");
        return CANCEL;
    }

    public String delete(){
        System.out.println("PantDetailAction -> delete()");
        if(id!=null){

            pantDetail = pantDetailManager.get(id);
            if(pantDetail.getDeleted()){
                List<PantDetailTradeMark> listAuxPantDetailTradeMarks =  pantDetail.getPantDetailTradeMarks();
                for (Iterator<PantDetailTradeMark> it = listAuxPantDetailTradeMarks.iterator(); it.hasNext();) {
                    PantDetailTradeMark pDTMark = it.next();

//                    List<SeamStorage> seamStorageList =
//                            seamStorageManager.findByPantDesignAndTradeMark(
//                                                pantDetail.getStorageCut().getPantDesign().getId(), pDTMark.getTradeMark().getId());
//                    SeamStorage seamStorage;
//                    Integer stock = 0;
//                    if(!seamStorageList.isEmpty()){

                        StorageCut storageCutAux = pantDetail.getStorageCut();
                        storageCutAux.setStock(storageCutAux.getStock() + pantDetail.getQuantity());
                        storageCutManager.save(storageCutAux);
//                        seamStorage = seamStorageList.get(0);
                       // stock = seamStorage.getStock();

                       // seamStorage.setStock(stock - pantDetail.getQuantity());
                        pantDetailManager.remove(id);
//                        seamStorageManager.save(seamStorage);
//                    }
                }
                saveMessage(getText("pantDetail.delete"));
            }else{
                saveMessage(getText("pantDetail.errorDelete"));
            }

        }
        System.out.println("PantDetailAction -> end delete()");
        return SUCCESS;
    }

    public String editReviewPantDetail(){
        System.out.println("editReviewPantDetail() ");
        pantDetail = pantDetailManager.get(id);
        return SUCCESS;
    }
    public String addPantDetail(){
        System.out.println("addPantDetail() ");
        storageCut = storageCutManager.get(id);
        pantDetail = new PantDetail();
        tradeMarkList = tradeMarkManager.getAll();
        //optTradeMark= "Sin marca";
        return SUCCESS;
    }
    public String asignTrademarkToDressMaker(){
       System.out.println("asignTrademarkToDressMaker() ");
       if(id != null ){
          pantDetail = pantDetailManager.get(id);
          tradeMarkList = tradeMarkManager.getAll();
          pantDetailTradeMarkList = pantDetail.getPantDetailTradeMarks();
          currentCuantity = pantDetail.getCurrentQuantity();
       }

       return SUCCESS;
   }

    public String savePantDetailTrademark(){
        System.out.println( "savePantDetailTrademark()");
        if(quantity <= currentCuantity && !optTradeMark.equals("-1")){

            pantDetail = pantDetailManager.get(pantDetail.getId());
            TradeMark tradeMark = tradeMarkManager.get(new Long(optTradeMark));

            PantDetailTradeMark pantDetailTradeMark = new PantDetailTradeMark();
            pantDetailTradeMark.setQuantity(quantity);
            pantDetailTradeMark.setTradeMark(tradeMark);
            pantDetailTradeMark.setPantDetail(pantDetail);
            pantDetailTradeMarkManager.save(pantDetailTradeMark);

            List<SeamStorage> seamStorageList = seamStorageManager.findByPantDesignAndTradeMark(pantDetail.getStorageCut().getPantDesign().getId(), tradeMark.getId());
            SeamStorage seamStorage;
            Integer stock = 0;
            if(!seamStorageList.isEmpty()){
                seamStorage = seamStorageList.get(0);
                stock = seamStorage.getStock();
                seamStorage.setStock(stock + quantity);
            }else{
                seamStorage = new SeamStorage();
                seamStorage.setPantDesign(pantDetail.getStorageCut().getPantDesign());
                seamStorage.setStock(quantity);
                seamStorage.setTradeMark(tradeMark);
            }
            seamStorageManager.save(seamStorage);
            // --------------------- Decrement storage with trademark 'sin marca'

            List<SeamStorage> seamStorageList2 =
                    seamStorageManager.findByPantDesignAndTradeMark(pantDetail.getStorageCut().getPantDesign().getId(), new Long(0));
            SeamStorage seamStorage2;
            Integer stock2 = 0;
            if(!seamStorageList2.isEmpty()){
                seamStorage2 = seamStorageList2.get(0);
                stock2 = seamStorage2.getStock();
                seamStorage2.setStock(stock2 - quantity);
                seamStorageManager.save(seamStorage2);
            }

            pantDetail = pantDetailManager.get(pantDetail.getId());
            pantDetail.updateDistribution();
            pantDetailManager.save(pantDetail);
            id = pantDetail.getId();
            saveMessage(getText("pantDetail.updateTradeMark"));
            return asignTrademarkToDressMaker();
        }
        errorMessage(getText("pantDetail.errorTradeMark"));
        System.out.println( "PantDetailAction -> end savePantDetailTrademark()");
        return ERROR;
    }

    public String cancelPantDetailTrademark(){
        System.out.println( "PantDetailAction -> cancelPantDetailTrademark()");
        System.out.println( "PantDetailAction -> end cancelPantDetailTrademark()");
        return INPUT;
    }
    public String deleteTrademarkToDressMaker(){
       System.out.println( "PantDetailAction -> deleteTrademarkToDressMaker()");
       if(id != null){
            PantDetailTradeMark pantDetailTradeMark = pantDetailTradeMarkManager.get(id);

            List<SeamStorage> seamStorageList = seamStorageManager.findByPantDesignAndTradeMark(
                    pantDetailTradeMark.getPantDetail().getStorageCut().getPantDesign().getId(), pantDetailTradeMark.getTradeMark().getId());
            SeamStorage seamStorage;

            Integer stock = 0;
            if(!seamStorageList.isEmpty()){
                seamStorage = seamStorageList.get(0);
                stock = seamStorage.getStock();
                seamStorage.setStock(stock + pantDetailTradeMark.getQuantity());
                seamStorageManager.save(seamStorage);

                pantDetailTradeMarkManager.remove(pantDetailTradeMark.getId());

                pantDetail = pantDetailManager.get(pantDetailTradeMark.getPantDetail().getId());
                tradeMarkList = tradeMarkManager.getAll();
                pantDetailTradeMarkList = pantDetail.getPantDetailTradeMarks();
                currentCuantity = pantDetail.getCurrentQuantity();


            }
       }
       System.out.println( "PantDetailAction ->  end deleteTrademarkToDressMaker()");
       return SUCCESS;
    }
    public String saveReviewPantDetail(){
        System.out.println( "PantDetailAction -> saveReviewPantDetail()");
        if( pantDetail.getPriceXclothes() > 0 &&
           ((pantDetail.getQuantityFail() == 0 && pantDetail.getPriceXclotheFail() == 0)
             || (pantDetail.getQuantityFail() !=0 && pantDetail.getPriceXclotheFail() != 0 ))){

            PantDetail pantDetailAux = pantDetailManager.get(pantDetail.getId());

            Double diffAmountTotal =  (pantDetail.getPriceXclothes() * pantDetailAux.getQuantity())- pantDetailAux.getTotalAmountClothes();
            Integer diffQuantFail = pantDetail.getQuantityFail() - pantDetailAux.getQuantityFail();
            Double diffAmountTotalFail = pantDetail.getQuantityFail() * pantDetail.getPriceXclotheFail() - pantDetailAux.getTotalAmountFailClothes();
            pantDetailAux.setPriceXclothes(pantDetail.getPriceXclothes());
            pantDetailAux.setTotalAmountClothes(pantDetail.getPriceXclothes() * pantDetailAux.getQuantity());
            pantDetailAux.setQuantityFail(pantDetail.getQuantityFail());
            pantDetailAux.setPriceXclotheFail(pantDetail.getPriceXclotheFail());

            pantDetailAux.setTotalAmountFailClothes(pantDetailAux.getQuantityFail() * pantDetailAux.getPriceXclotheFail());

            pantDetailAux.setQuantityRealClothes(pantDetailAux.getQuantity() - pantDetailAux.getQuantityFail());

            pantDetailAux.setQuantityRealClothesCurrent(pantDetailAux.getQuantity() - pantDetailAux.getQuantityFail() );
            pantDetailAux.setCurrentAmount(pantDetailAux.getCurrentAmount() + diffAmountTotal);
            pantDetailAux.setTotalAmount(pantDetailAux.getTotalAmount() + diffAmountTotal);
            pantDetailAux.setDeleted(false);
            ProcessDressmaker procDressAux = pantDetailAux.getProcessDressmaker();
            procDressAux.setDeleted(false);
            procDressAux.setTotalAmount(procDressAux.getTotalAmount() + diffAmountTotal);


            procDressAux.setTotalAmountFail(procDressAux.getTotalAmountFail() + diffAmountTotalFail );            
            if(procDressAux.getTotalCurrentAmount() == 0)
                procDressAux.setTotalCurrentAmount(procDressAux.getTotalAmount() - diffAmountTotalFail);
            else
                procDressAux.setTotalCurrentAmount(procDressAux.getTotalCurrentAmount() + diffAmountTotal - diffAmountTotalFail);


            BalanceEmployee balanceEmployee = procDressAux.getBalanceEmployee();
            periodPaymentEmployee = balanceEmployee.getPeriodPaymentEmployee();

            balanceEmployee.setAmountWon(balanceEmployee.getAmountWon() + diffAmountTotal);
            balanceEmployee.setBalance(periodPaymentEmployee.getCurrentAmount() + diffAmountTotal - diffAmountTotalFail);
            balanceEmployee.setAmountPaid(balanceEmployee.getAmountPaid() + diffAmountTotalFail);
            balanceEmployee.setTypeBalance(1);

            if((balanceEmployee.getAmountPaid() + diffAmountTotalFail) > 0)
                balanceEmployee.setObservation(balanceEmployee.getAmountPaid() +" POR DESCUENTO");
            else
                balanceEmployee.setObservation("");

            periodPaymentEmployee.setCurrentAmount(periodPaymentEmployee.getCurrentAmount() + diffAmountTotal - diffAmountTotalFail);
            periodPaymentEmployee.setAmountWon(periodPaymentEmployee.getAmountWon() + diffAmountTotal);
            periodPaymentEmployee.setDiscount(periodPaymentEmployee.getDiscount() + diffAmountTotalFail);

            periodPaymentEmployeeManager.save(periodPaymentEmployee);
            balanceEmployeeManager.save(balanceEmployee);
            processDressmakerManager.save(procDressAux);
            pantDetailManager.save(pantDetailAux);
            
            List<PantDetailTradeMark> listTradeMark = pantDetailAux.getPantDetailTradeMarks();
            if(!listTradeMark.isEmpty()){
                TradeMark trademaker = listTradeMark.get(0).getTradeMark();
                List<SeamStorage> sStList = 
                            seamStorageManager.findByPantDesignAndTradeMark( pantDetailAux.getStorageCut().getPantDesign().getId()
                                                                           , trademaker.getId());
                    SeamStorage seamStAux;
                    Integer stock = 0;
                    if(!sStList.isEmpty()){
                        seamStAux = sStList.get(0);
                        stock = seamStAux.getStock();
                        if(stock == 0 )
                            seamStAux.setStock(pantDetailAux.getQuantity() - diffQuantFail);
                        else{
                            seamStAux.setStock(stock - diffQuantFail);
                        }
                        seamStorageManager.save(seamStAux);
                    }
            }
        }
        System.out.println( "PantDetailAction ->  end saveReviewPantDetail()");
        return INPUT;
    }
    public PantDetailManager getPantDetailManager() {
        return pantDetailManager;
    }

    public void setPantDetailManager(PantDetailManager pantDetailManager) {
        this.pantDetailManager = pantDetailManager;
    }

    public CutDetailManager getCutDetailManager() {
        return cutDetailManager;
    }

    public void setCutDetailManager(CutDetailManager cutDetailManager) {
        this.cutDetailManager = cutDetailManager;
    }

    public List<CutDetail> getCutDetailList() {
        return cutDetailList;
    }

    public void setCutDetailList(List<CutDetail> cutDetailList) {
        this.cutDetailList = cutDetailList;
    }

    public StorageCutManager getStorageCutManager() {
        return storageCutManager;
    }

    public void setStorageCutManager(StorageCutManager storageCutManager) {
        this.storageCutManager = storageCutManager;
    }

    public List<StorageCut> getStorageCutList() {
        return storageCutList;
    }

    public void setStorageCutList(List<StorageCut> storageCutList) {
        this.storageCutList = storageCutList;
    }

    public Long getStockChoice() {
        return stockChoice;
    }

    public void setStockChoice(Long stockChoice) {
        this.stockChoice = stockChoice;
    }

    public PantDetail getPantDetail() {
        return pantDetail;
    }

    public void setPantDetail(PantDetail pantDetail) {
        this.pantDetail = pantDetail;
    }

    public PantDetailCutDetailManager getPantDetailCutDetailManager() {
        return pantDetailCutDetailManager;
    }

    public void setPantDetailCutDetailManager(PantDetailCutDetailManager pantDetailCutDetailManager) {
        this.pantDetailCutDetailManager = pantDetailCutDetailManager;
    }

    public PantDetailCutDetail getPantDetailCutDetail() {
        return pantDetailCutDetail;
    }

    public void setPantDetailCutDetail(PantDetailCutDetail pantDetailCutDetail) {
        this.pantDetailCutDetail = pantDetailCutDetail;
    }

    public StorageCut getStorageCut() {
        return storageCut;
    }

    public void setStorageCut(StorageCut storageCut) {
        this.storageCut = storageCut;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public List<PantDetail> getPantDetailList() {
        return pantDetailList;
    }

    public void setPantDetailList(List<PantDetail> pantDetailList) {
        this.pantDetailList = pantDetailList;
    }

    public Long getIdTemp() {
        return idTemp;
    }

    public void setIdTemp(Long idTemp) {
        this.idTemp = idTemp;
    }

    public SeamStorageManager getSeamStorageManager() {
        return seamStorageManager;
    }

    public void setSeamStorageManager(SeamStorageManager seamStorageManager) {
        this.seamStorageManager = seamStorageManager;
    }

    public List<TradeMark> getTradeMarkList() {

        return tradeMarkList;
    }

    public void setTradeMarkList(List<TradeMark> tradeMarkList) {
        this.tradeMarkList = tradeMarkList;
    }

    public String getOptTradeMark() {
        return optTradeMark;
    }

    public void setOptTradeMark(String optTradeMark) {
        this.optTradeMark = optTradeMark;
    }

    public GenericManager<TradeMark, Long> getTradeMarkManager() {
        return tradeMarkManager;
    }

    public void setTradeMarkManager(GenericManager<TradeMark, Long> tradeMarkManager) {
        this.tradeMarkManager = tradeMarkManager;
    }

    public ProcessDressmakerManager getProcessDressmakerManager() {
        return processDressmakerManager;
    }

    public void setProcessDressmakerManager(ProcessDressmakerManager processDressmakerManager) {
        this.processDressmakerManager = processDressmakerManager;
    }

    public ProcessDressmaker getProcessDressmaker() {
        return processDressmaker;
    }

    public void setProcessDresmaker(ProcessDressmaker processDressmaker) {
        this.processDressmaker = processDressmaker;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public PantDetailTradeMarkManager getPantDetailTradeMarkManager() {
        return pantDetailTradeMarkManager;
    }

    public void setPantDetailTradeMarkManager(PantDetailTradeMarkManager pantDetailTradeMarkManager) {
        this.pantDetailTradeMarkManager = pantDetailTradeMarkManager;
    }

    public List<PantDetailTradeMark> getPantDetailTradeMarkList() {
        return pantDetailTradeMarkList;
    }

    public void setPantDetailTradeMarkList(List<PantDetailTradeMark> pantDetailTradeMarkList) {
        this.pantDetailTradeMarkList = pantDetailTradeMarkList;
    }

    public Integer getCurrentCuantity() {
        return currentCuantity;
    }

    public void setCurrentCuantity(Integer currentCuantity) {
        this.currentCuantity = currentCuantity;
    }

    public BalanceEmployeeManager getBalanceEmployeeManager() {
        return balanceEmployeeManager;
    }

    public void setBalanceEmployeeManager(BalanceEmployeeManager balanceEmployeeManager) {
        this.balanceEmployeeManager = balanceEmployeeManager;
    }

    public PeriodPaymentEmployee getPeriodPaymentEmployee() {
        return periodPaymentEmployee;
    }

    public void setPeriodPaymentEmployee(PeriodPaymentEmployee periodPaymentEmployee) {
        this.periodPaymentEmployee = periodPaymentEmployee;
    }

    public PeriodPaymentEmployeeManager getPeriodPaymentEmployeeManager() {
        return periodPaymentEmployeeManager;
    }

    public void setPeriodPaymentEmployeeManager(PeriodPaymentEmployeeManager periodPaymentEmployeeManager) {
        this.periodPaymentEmployeeManager = periodPaymentEmployeeManager;
    }

}
